/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jsysacc.asistencia.model.logic.maestros;

import com.jsysacc.asistencia.model.beans.maestros.Horario;
import com.jsysacc.asistencia.model.dao.design.maestros.IHorarioDAO;
import com.jsysacc.asistencia.model.dao.factory.MainDAOFactory;
import java.util.ArrayList;

/**
 *
 * @author Carlos
 */
public class HorarioLogic {

    IHorarioDAO horarioDAO = MainDAOFactory.getInstance().getHorarioDAO();

    public HorarioLogic() {
    }

    public ArrayList<Horario> getAll() throws Exception {
        return horarioDAO.getAll();
    }

    public ArrayList<Horario> getByCriterio(String criterio, String valor) throws Exception {
        return horarioDAO.getByCriterio(criterio, valor);
    }

    public Horario getByPk(String pk) throws Exception {
        return horarioDAO.getByPk(pk);
    }

    public boolean delete(String pk) throws Exception {
        return horarioDAO.delete(pk);
    }

    public boolean insert(Horario entity) throws Exception {
        return horarioDAO.insert(entity);
    }

    public boolean update(Horario entity) throws Exception {
        return horarioDAO.update(entity);
    }

}
